package pacman.ml.features;

import pacman.game.Game;
import pacman.game.Constants.GHOST;

public class EdibleGhostsFeature extends FeatureExtractor {
	public EdibleGhostsFeature(float arg) {}
	public float Extract(Game game) {
		boolean edibleGhost = false;
		
		for(GHOST ghost : GHOST.values())
			if(game.getGhostEdibleTime(ghost)>0)
			{
				edibleGhost = true;
			}
		
		if(edibleGhost)
			return 1.0f;
		return 0.0f;
	}
}